package com.download.web.mapper;

import com.download.web.entity.BusDicDictionary;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author cmy
 * @since 2019-02-20
 */
public interface BusDicDictionaryMapper extends BaseMapper<BusDicDictionary> {

    /**
     * 分页查找字典
     * @param pageIndex 开始索引
     * @param pageSize 一次查询数量
     * @return
     */
    @Select("select * from bus_dic_dictionary limit ${pageIndex},${pageSize}")
    List<BusDicDictionary> dictionaries(@Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);

    /**
     * 字典总数量
     * @return
     */
    @Select("select count(1) from bus_dic_dictionary ")
    Integer dictionariesCount();

}
